<?php

if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * 新闻中心详情
 */
 
class NewsDetailsAction extends M_Controller {

    /**
     * 构造函数
     */
    public function __construct() {
        parent::__construct();
    }
	
    /**
     * 程序执行部分
     */
    public function index() {
		include("/extra/fun/inc.php");
		include("/extra/fun/mysql.fun.php");
        $id= $_REQUEST['id'];
		$sql_0="update dr_1_news set hits=hits+1 where id={$id}";
		query($sql_0);
		$sql_1="select * from dr_1_news nl,dr_1_news_data_0 nd where nl.id=nd.id and nl.id={$id}";
		$result=query($sql_1);
		while($rs=mysql_fetch_array($result)){
			echo '
			<h1>'.$rs["title"].'</h1>
			<div class="date"><img src="/styles/images/cla.png" alt="" />'.date("Y-m-d",$rs["updatetime"]).'</div>
			<div class="ct">
				'.$rs["content"].'
			</div>
			';
		}
	}
}